#include <math.h>
#include <iostream>

using namespace std;

static int addTriangle1(int distance1, int distance2)
{
    if (distance1 < distance2) {
        return -1;
    } else {
        return sqrt(pow(distance1 / 10000.0f, 2) - pow(distance2 / 10000.0f, 2)) * 10000.0f;
    }
}

int main(int argc, char *argv[])
{
    int op = 1;

    switch (op) {
    case 1:
    {
        int result = addTriangle1(291, 264);
        cout << "addTriangle1: " << result << endl;
    }
        break;
    default:
        break;
    }

    return 0;
}
